package cn.itcast.mq.config;

import org.springframework.amqp.core.Queue;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @作者 itcast
 * @创建日期 2021/11/1 15:22
 **/
@Configuration
public class RabbitConfig {
    @Bean
    Queue objectQueue(){
        return new Queue("object.queue");
    }
    @Bean
    MessageConverter messageConverter(){
        return new Jackson2JsonMessageConverter();
    }
}
